// TextureRenderer.h: interface for the CTextureRenderer class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TEXTURERENDERER_H__A29D98E4_708B_11D5_AD0F_607057C10000__INCLUDED_)
#define AFX_TEXTURERENDERER_H__A29D98E4_708B_11D5_AD0F_607057C10000__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CTextureRenderer  
{
private:

	PDIRECT3DTEXTURE8		m_ptextTarget;
	PDIRECT3DSURFACE8		m_psurfTargetZbuffer;

	PDIRECT3DSURFACE8		m_psurfPrevTarget;
	PDIRECT3DSURFACE8		m_psurfPrevZbuffer;	

	BOOL					m_bSet;

public:

	CTextureRenderer( PDIRECT3DDEVICE8 pDevice, BOOL useZBuffer = TRUE, DWORD width = 512, DWORD height = 512, D3DFORMAT format = D3DFMT_A8R8G8B8, D3DFORMAT zformat = D3DFMT_D24S8 );
	~CTextureRenderer();

	BOOL SetTarget( PDIRECT3DDEVICE8 pDevice );
	BOOL RestoreTarget( PDIRECT3DDEVICE8 pDevice );

	PDIRECT3DTEXTURE8 GetTargetTexture();
	
};

#endif // !defined(AFX_TEXTURERENDERER_H__A29D98E4_708B_11D5_AD0F_607057C10000__INCLUDED_)
